<template>
    <ul class="pic-list clearfix">
        <li class="clearfix" v-for="i in img">
            <a v-link="{name: 'detail', params: {id: i.id, cid: cid, tid: tid}}">
                <div class="img">
                    <img :src="i.img" alt="{{i.title}}"/>
                </div>
                <div class="text">{{i.content || i.title}}</div>
            </a>
        </li>
    </ul>
</template>

<script>
export default {
    name: 'PicList',
    data () {
        return {
            cid: this.$route.params.cid,
            tid: this.$route.params.tid,
        }
    },
    props: {
        img: Array
    }
}
</script>
<style>
    .pic-list{
        padding: 24px 15px 0;
    }

    .pic-list li{
        margin-bottom: 24px;
        overflow: hidden;
    }

    .pic-list .img{
        float: left;
        width: 30%;
    }

    .pic-list .text{
        overflow: hidden;
        padding: 0 15px;
        font-size: 12px;
        line-height: 20px;
        color: #151515;
    }
</style>